﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class RolesModel
    {
        public int RoleID { get; set; }
        public string Name { get; set; }
        public Nullable<bool> Staus { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        public Nullable<bool> Deleted { get; set; }
        public string Mota { get; set; }

        public static void MapForm(RolesModel model, ref Role entity)
        {
            entity.RoleID = model.RoleID;
            entity.Name = model.Name;
            entity.Staus = model.Staus;
            entity.DateCreate = model.DateCreate;
            entity.Deleted = model.Deleted;
            entity.Mota = model.Mota;
            
        }

        public static void MapForm(Role entity, ref  RolesModel model)
        {
            model.RoleID = entity.RoleID;
            model.Name = entity.Name;
            model.Staus = entity.Staus;
            model.DateCreate = entity.DateCreate;
            model.Deleted = entity.Deleted;
            model.Mota = entity.Mota;
        }
    }
}